home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / src / Tools / archie-1.4.1 / Makefile.orig < prev    next >
Encoding:
Makefile  |  1995-06-18  |  5.5 KB  |  147 lines

  1. #
  2. # Makefile for the minimal build for an archie Prospero client.
  3. #
  4. # Your C compiler:
  5. #CC=cc
  6.  
  7. # For most systems, these OPTIONS will suffice.  Exceptions:
  8. #
  9. #    * If you're on a Stardent, add  -43
  10. #    * If you're running EP/IX, you may need to add  -systype bsd43
  11. #      but try it without it first.
  12. OPTIONS= -O -I. -I/usr/netinclude -I/usr/ucbinclude
  13.  
  14. # For this, DEFINES is usually ok as-is.  Try it without any of these
  15. # first; if some stuff fails or shows up undefined, then come back and
  16. # add 'em.  Also please drop me a line if you had to add anything...ideally
  17. # things will reach a point where this whole section will be unnecessary.
  18. #
  19. #     * if you want to include the debugging code (so you
  20. #       can help with problem-solving if any crop up), add    -DDEBUG
  21. #     * if you're running Interactive Unix, add              -DISC
  22. #     * if you're running System V, add                  -DSYSV
  23. #     * if you're running a USG (System V.2) system, add      -DUSG
  24. #     * if you're running UTS, add                  -DUTS
  25. #     * if your system doesn't have the functions index(),
  26. #       rindex(), bcopy(), or bzero(), add                    -DFUNCS
  27. #     * if your system is missing the getenv(3) routine, add  -DGETENV
  28. #     * if your system doesn't have the re_comp/regcmp or re_exec/regex
  29. #       routines (no regex(3)/regcmp(3X) library), then add   -DNOREGEX
  30. #     * if your system is lacking strspn(), add               -DSTRSPN
  31. #     * if you're using the unbundled SparcCompiler on a
  32. #    Solaris 2 system, add                      -DSOLARIS2
  33. DEFINES= -DDEBUG
  34.  
  35. # The default Archie server; choose one of:
  36. #    archie.ans.net        (USA [NY])
  37. #    archie.rutgers.edu        (USA [NJ])
  38. #    archie.sura.net        (USA [MD])
  39. #    archie.unl.edu        (USA [NE])
  40. #    archie.mcgill.ca        (Canada)
  41. #    archie.funet.fi        (Finland/Mainland Europe)
  42. #    archie.au            (Australia)
  43. #    archie.doc.ic.ac.uk    (Great Britain/Ireland)
  44. #    archie.wide.ad.jp        (Japan)
  45. #    archie.ncu.edu.tw        (Taiwan)
  46. #
  47. # Note this only applies to the command-line client; to change the
  48. # default for the Emacs lisp version, set the archie-server variable.
  49. ARCHIE= archie.sura.net
  50.  
  51. #    Usually LDFLAGS is empty; if, after you build this, archie
  52. #     complains that it can't resolve ARCHIE.ANS.NET (or whatever
  53. #     you defined ARCHIE_HOST as), you need to add `-lresolv'.
  54. #
  55. #    * If you need the PW library (e.g. A/UX), add -lPW
  56. LDFLAGS=
  57. # If you're using ISC, use:
  58. #LDFLAGS= -linet
  59. # If you're using Wallongong TCP/IP on an AT&T box, use:
  60. #LDFLAGS= -lnet -lnsl_s
  61. # If you're using UTS, use:
  62. #LDFLAGS= -lsocket
  63. # If you're using System V Release 4, use:
  64. #LDFLAGS= -L/usr/ucblib -lucb -lsockdns -lnsl
  65. # If you're using Solaris 2.x (don't use /usr/ucb/cc!), use:
  66. #LDFLAGS= -lnsl -lsocket
  67. # If you're using Consensus SVR4, use:
  68. #LDFLAGS= -lnsl_i -lsocket -lucb
  69. # If you're using Dynix/PTX, use:
  70. #LDFLAGS= -lsocket -linet -lnsl -lPW
  71.  
  72. # =========================
  73. # Yer' done....make archie.
  74. # =========================
  75. #
  76. CFLAGS=$(OPTIONS) $(DEFINES) -DARCHIE_HOST=\"$(ARCHIE)\"
  77.  
  78. VERSION=1.4.1
  79. VMS_VERSION=`echo $(VERSION) | sed -e 's,\\.,_,g'`
  80.  
  81. OBJS=    aquery.o archie.o atalloc.o dirsend.o get_pauth.o get_vdir.o \
  82.     getopt.o getopt1.o \
  83.     perrmesg.o procquery.o ptalloc.o regex.o stcopy.o support.o \
  84.     vlalloc.o vl_comp.o
  85.  
  86. all: archie
  87.  
  88. archie: $(OBJS)
  89.     $(CC) $(CFLAGS) -o $@ $(OBJS) $(LDFLAGS)
  90.  
  91. $(OBJS): archie.h pmachine.h pcompat.h Makefile
  92.  
  93. procquery.o: copyright.h
  94.  
  95. clean:
  96.     -rm -f *.o archie archie.doc
  97.  
  98. gclean: clean
  99.     -rm -f *~ archie.0* archie$(VMS_VERSION).com archie.tar* gmon.out archie.doc
  100.  
  101. unx-deadly:
  102.     unifdef -UXARCHIE xprocquery.c > procquery.c
  103.  
  104. FILES=    INSTALL Makefile Prospero README README.ALEX README.dos archie.c \
  105.     archie.h archie.el archie.lnk archie.doc archie.man archie.hlp \
  106.     aquery.c atalloc.c dirsend.c get_pauth.c get_vdir.c \
  107.     getopt.c getopt.h getopt1.c \
  108.     make.com makefile.cut makefile.dos makefile.os2 makefile.nfs \
  109.     msdos/cutcp.h msdos/hostform.h msdos/netevent.h pc-archie.nfs \
  110.     perrmesg.c patchlevel.h pauthent.h pcompat.h perrno.h pfs.h pmachine.h \
  111.     pprot.h procquery.c ptalloc.c rdgram.h regex.c regex.h stcopy.c \
  112.     support.c copyright.h vl_comp.c vlalloc.c vms.h vms_support.c \
  113.     vms/fd.h vms/in.h vms/pseudos.h vms/signal.h vms/socket.h vms/time.h \
  114.     vms/types.h vms/network.h vms/multi.opt vms/ucx.opt vms/woll.opt
  115.  
  116. BFILES= $(FILES) xprocquery.c
  117.  
  118. dist: tar shar dcl
  119.  
  120. shar: archie.doc
  121.     makekit -narchie-$(VERSION). archie-$(VERSION) `echo $(FILES) | \
  122.         tr ' ' '\012' | sed -e "s/^/archie-$(VERSION)\//g"` \
  123.         vms msdos > Manifest
  124.  
  125. archie.doc: archie.man
  126.     nroff -man archie.man | tr '\010' _ | sed -e s/__//g > archie.doc
  127.  
  128. dcl: archie.doc
  129.     if [ ! -d archie$(VMS_VERSION)/ ]; then ln -s . archie$(VMS_VERSION); fi
  130.     echo '$$ write sys$$output "Unpacking..."' > archie$(VMS_VERSION).com
  131.     echo '$$ if f$$search("archie.dir") .eqs. "" then create/dir [.ARCHIE]' >> archie$(VMS_VERSION).com
  132.     echo '$$ if f$$search("[.archie]vms.dir") .eqs. "" then create/dir [.ARCHIE.VMS]' >> archie$(VMS_VERSION).com
  133.     echo '$$ if f$$search("[.archie]msdos.dir") .eqs. "" then create/dir [.ARCHIE.MSDOS]' >> archie$(VMS_VERSION).com
  134.     echo '$$ set noverify' >> archie$(VMS_VERSION).com
  135.     -rm -f archie
  136.     ln -s . archie
  137.     dclshar `echo "$(FILES)" | tr ' ' '\012' | \
  138.         sed -e "s/^/archie\//g"` >> archie$(VMS_VERSION).com
  139.     -rm -f archie
  140.     ver=$(VMS_VERSION); echo '$$ write sys$$output "Ok, now enter the $$ver directory, look at MAKE.COM, then type @MAKE ."' >> archie$(VMS_VERSION).com
  141.  
  142. tar: archie.doc
  143.     if [ ! -d archie-$(VERSION)/ ]; then ln -s . archie-$(VERSION); fi
  144.     tar cvf archie-$(VERSION).tar `echo $(FILES) |\
  145.      tr ' ' '\012' | sed -e "s/^/archie-$(VERSION)\//g"`
  146.     compress -f archie-$(VERSION).tar
  147.